package com.kofan.shelter.commons.util.exception;

public class CommonException extends RuntimeException {

    private static final long serialVersionUID = 5991834020767419556L;

    private String code;

    public CommonException(String code, String message) {
        super(message);
        this.code = code;
    }

    public CommonException(String message){
        super(message);
        this.code = "500";
    }

//    public CommonException(ExceptionMessage e){
//        super(e.getMessage());
//        this.code=e.getCode();
//    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

}
